home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 October
/
PCWorld_2000-10_cd1.bin
/
Software
/
Vyzkuste
/
tiptrik
/
tiptrik.exe
/
soubory pro pcw 10 - æikovn¡ pomocn¡ci pro vaçe Windows
/
skripty
/
delx.bat
< prev
next >
Wrap
DOS Batch File
|
2000-08-18
|
2KB
|
53 lines
@echo off
if exist c:\temp.bat del c:\temp.bat
if (%1)==() goto Warnung
echo Set MyShell=wscript.CreateObject("Wscript.Shell") > %temp%\delsub.vbs
echo Set MyFiles = CreateObject("Scripting.FileSystemObject") >> %temp%\delsub.vbs
echo Datei="c:\temp.bat" >> %temp%\delsub.vbs
echo Set f = MyFiles.GetFile(Datei) >> %temp%\delsub.vbs
echo If f.size=0 then Wscript.quit >> %temp%\delsub.vbs
echo Set f = MyFiles.OpenTextFile(Datei, 1) >> %temp%\delsub.vbs
echo Text = f.ReadAll >> %temp%\delsub.vbs
echo Set f = MyFiles.OpenTextFile(Datei, 2, True) >> %temp%\delsub.vbs
echo f.Write Replace(Text, "C:\", "DELTREE /y " & chr(34) & "C:\",1,-1,1) >> %temp%\delsub.vbs
echo f.close >> %temp%\delsub.vbs
echo Set f = MyFiles.OpenTextFile(Datei, 1) >> %temp%\delsub.vbs
echo Text = f.ReadAll >> %temp%\delsub.vbs
echo Set f = MyFiles.OpenTextFile(Datei, 2, True) >> %temp%\delsub.vbs
echo f.Write Replace(Text, "D:\", "DELTREE /y " & chr(34) & "D:\",1,-1,1) >> %temp%\delsub.vbs
echo f.close >> %temp%\delsub.vbs
echo Set f = MyFiles.OpenTextFile(Datei, 1) >> %temp%\delsub.vbs
echo Text = f.ReadAll >> %temp%\delsub.vbs
echo Set f = MyFiles.OpenTextFile(Datei, 2, True) >> %temp%\delsub.vbs
echo f.Write Replace(Text, "E:\", "DELTREE /y " & chr(34) & "E:\",1,-1,1) >> %temp%\delsub.vbs
echo f.close >> %temp%\delsub.vbs
REM echo Set f = MyFiles.OpenTextFile(Datei, 1) >> %temp%\delsub.vbs
REM echo Text = f.ReadAll >> %temp%\delsub.vbs
REM Set f = MyFiles.OpenTextFile(Datei, 2, True) >> %temp%\delsub.vbs
REM f.Write Replace(Text, "E:\", "DELTREE /y " & chr(34) & "F:\",1,-1,1) >> %temp%\delsub.vbs
REM f.close >> %temp%\delsub.vbs
:Loop
command /c dir /s /b %1 >> c:\temp.bat
shift
if not (%1)==() goto loop
cscript %temp%\delsub.vbs
call c:\temp.bat
goto Ende
:Warnung
echo Musite zadat nejmene jednu masku docasnych souboru.
echo Priklad: delsub c:\*.tmp d:\*.tmp
:Ende
del %temp%\delsub.vbs > nul